package net.ojbk.study.twobox.beans.form.query;

import net.ojbk.study.twobox.beans.form.InputItem;
import net.ojbk.study.twobox.beans.po.Job;
import net.ojbk.study.twobox.beans.vo.SelectOption;
import net.ojbk.study.twobox.dao.JobMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: twobox
 * Date: 2019/4/18
 * Time: 11:01
 * Description: No Description
 */
@Component
public class JobQueryForm extends SupperQueryForm<Job> {
    private InputItem inputItemClass = new InputItem("班级",
            "classid",
            "",
            "select", null);

    @Autowired
    public JobQueryForm(JobMapper jobMapper) {

        this.inputItems.add(inputItemClass);
    }

    @Override
    public List<InputItem> getInputItems() throws Exception {
        inputItemClass.setOther(this.selectOptionUtil.getSelectOptionListByName("class"));
        return super.getInputItems();
    }
}
